<template>
  <!-- 调用 <Paging @change="pageChange" :page="itemCondition"></Paging> -->
  <div>
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="page.pageNum"
      :page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400]"
      :page-size="page.pageSize"
      layout="total, sizes, prev, pager, next, jumper"
      :total="page.rowCount"
    ></el-pagination>
  </div>
</template>

<script scoped>
  export default {
    props: {
      page: {
        type: Object,
        default: {
          rowCount: 0,
          pageSize: 10,
          pageNum: 1,
        },
      },
    },
    data() {
      return {}
    },
    methods: {
      handleSizeChange(val) {
        this.page.pageSize = val
        this.$emit('change', this.page)
      },
      handleCurrentChange(val) {
        this.page.pageNum = val
        this.$emit('change', this.page)
      },
    },
  }
</script>

<style></style>
